package com.zhou.springcloud.cousumer.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author zhouyongjun
 * @Description:
 * @date 2021/3/20 14:56
 */
@Configuration
public class ConfigBean {
    @Bean
    @LoadBalanced //配置负载均衡,ribbon
    public RestTemplate restTemplate() {
        RestTemplate restTemplate = new RestTemplate();
        return restTemplate;
    }

}
